import request from '@/utils/request'

export default {
  getList(data) {
    return request({
      url: `/api/process/getList`,
      method: 'post',
      data
    })
  },
  getPage(page, pageSize, data) {
    return request({
      url: `/api/process/getPage/${page}/${pageSize}`,
      method: 'post',
      data
    })
  },
  add(data) {
    return request({
      url: `/api/process/add`,
      method: 'post',
      data
    })
  },
  get(id) {
    return request({
      url: `/api/process/get/${id}`,
      method: 'post'
    })
  },
  update(data) {
    return request({
      url: `/api/process/update`,
      method: 'post',
      data
    })
  },
  status(id, status) {
    return request({
      url: `/api/process/status/${id}/${status}`,
      method: 'post'
    })
  },
  configOrgForProcess(processId, data) {
    return request({
      url: `/api/process/configOrgForProcess/${processId}`,
      method: 'post',
      data
    })
  },
  getBoundOrgs(processId) {
    return request({
      url: `/api/process/getBoundOrgs/${processId}`,
      method: 'post'
    })
  },
  getExecutorOrgUserList(processId) {
    return request({
      url: `/api/process/getExecutorOrgUserList/${processId}`,
      method: 'post'
    })
  }
}
